package com.xiaoyun.bo;

import com.xiaoyun.annotation.ValidMobile;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

@Data
public class AddressBO {

    private String addressId;

    private String userId;

    /**
     * 收件人姓名
     */
    @NotBlank(message = "收件人姓名不能为空")
    @Length(max = 12, message = "收货人姓名不能太长")
    private String receiver;

    /**
     * 收件人手机号
     */
    @NotBlank(message = "收件人手机号不能为空")
    @ValidMobile
    private String mobile;

    /**
     * 省份
     */
    @NotBlank(message = "收货地址不能为空")
    private String province;

    /**
     * 城市
     */
    @NotBlank(message = "收货地址不能为空")
    private String city;

    /**
     * 区县
     */
    @NotBlank(message = "收货地址不能为空")
    private String district;

    /**
     * 详细地址
     */
    @NotBlank(message = "收货地址不能为空")
    private String detail;
}
